package com.bw.service;

import com.bw.bean.Dept;
import com.bw.dao.DeptDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class DeptServiceImpl implements DeptService {
    @Resource
    private DeptDao deptDao;
    @Override
    public void save(Dept dept) {
        deptDao.save(dept);
    }

    @Override
    public void saveBatch(List<Dept> list) {
        deptDao.saveBatch(list);
    }

    @Override
    public void updateById(Dept dept) {
        deptDao.updateById(dept);
    }

    @Override
    public void updateStatusById(Dept dept) {
        deptDao.updateStatusById(dept);
    }

    @Override
    public List<Dept> getListByName(Dept dept) {
        return deptDao.getListByName(dept);
    }

    @Override
    public List<Dept> getListByParentId(int id) {
        return deptDao.getListByParentId(id);
    }

    @Override
    public void deleteById(Dept dept) {
        deptDao.deleteById(dept);
    }
}
